A = imread('yellowlily.jpg');
% for red component
figure,imshow(A,'InitialMagnification',100);
Br = fft2(A(:,:,1));
AngleR = angle(Br);
figure,imshow(AngleR,'InitialMagnification',100),title('Red Component');
Cr = abs(Br);
figure,imshow(Cr,[],'InitialMagnification',100),title('Red Component');
Dr = fftshift(Br);
figure,imshow(Dr,[],'InitialMagnification',100),title('Red Component');
figure,imshow((1+log(abs(Dr))),[],'InitialMagnification',100),title('Red Component');
%for green component
Bg = fft2(A(:,:,2));
AngleG = angle(Bg);
figure,imshow(AngleG,'InitialMagnification',100),title('Green Component');
Cg = abs(Bg);
figure,imshow(Cg,[],'InitialMagnification',100),title('Green Component');
Dg = fftshift(Bg);
figure,imshow(Dg,[],'InitialMagnification',100),title('Green Component');
figure,imshow((1+log(abs(Dg))),[],'InitialMagnification',100),title('Green Component');
% for blue component
Bb = fft2(A(:,:,3));
AngleB = angle(Bb);
figure,imshow(AngleB,'InitialMagnification',100),title('Blue Component');
Cb = abs(Bb);
figure,imshow(Cb,[],'InitialMagnification',100),title('Blue Component');
Db = fftshift(Bb);
figure,imshow(Db,[],'InitialMagnification',100),title('Blue Component');
figure,imshow((1+log(abs(Db))),[],'InitialMagnification',100),title('Blue Component');